<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>块级元素浮动</title>
    <style>
        /*  浮动：float: left; 
            1.浮动是脱离标准文档流，不区分行内、块级，用作制作并排的盒子
            2.盒子要浮动，都要浮动
            3.一定要把浮动的盒子放到div中
            4.父盒子要有足够的空间， 否则子盒子会掉下来
        */
        .up {
            width: 300px;
            height: 200px;
        }

        .up .box1 {
            float: left;
            width: 100px;
            height: 200px;
            background-color: gold;
        }

        .up .box2 {
            float: left;
            width: 200px;
            height: 200px;
            background-color: green;
        }

        .down {
            width: 300px;
            height: 200px;
            background-color: blue;
        }
    </style>
</head>

<body>
    <div class="up">
        <div class="box1">

        </div>
        <div class="box2">

        </div>
    </div>
    <div class="down">

    </div>
</body>

</html>